package com.zcx.qshop.view;

import android.content.Context;
import android.graphics.Color;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.zcx.helper.view.hot.HotListView;
import com.zcx.qshop.R;
import com.zcx.qshop.QSApplication;
import com.zcx.qshop.conn.JsonAreaAsyGet;

/**
 * Created by Administrator on 2015/8/31 0031.
 */
public class HotCityView extends HotListView<JsonAreaAsyGet.Area> {

    private LayoutInflater layoutInflater;

    public HotCityView(Context context, AttributeSet attrs) {

        super(context, attrs);

        layoutInflater = LayoutInflater.from(context);

    }

    @Override
    protected View getView(JsonAreaAsyGet.Area area) {

        View view = layoutInflater.inflate(R.layout.item_hot_city, null);

        view.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));

        TextView name = (TextView) view.findViewById(R.id.item_hot_city_text);

        name.setText(area.name);

        return QSApplication.ScaleScreenHelper.loadView((ViewGroup)view);

    }

    @Override
    protected int selectImgYes() {

        return R.drawable.shape_radius_solid_white_grey_one;

    }

    @Override
    protected int selectImgNo() {

        return R.drawable.shape_radius_solid_white_grey_one;

    }

    @Override
    protected int selectColorYes() {

        return Color.parseColor("#333333");

    }

    @Override
    protected int selectColorNo() {

        return Color.parseColor("#333333");

    }

}
